package java8_24.oop.Test_3;

public class Cat extends Animal{
   public double  physical;
    public Cat(String name, double weight) {
        super(name, weight);
    }

    public void  bite(Mouse mouse){
      physical+=mouse.getPhysical();
      mouse.setPhysical(0);
        System.out.println(getName()+"体重是"+getWeight()+"kg,它抓住了一只叫"+mouse.getName()+"体重是"+mouse.getWeight()+"kg的老鼠");
        System.out.println("猫的体力是"+physical+"老鼠的体力是"+mouse.getPhysical());
   }
   public void show(){
       System.out.println(getName()+"体重是"+getWeight()+"kg,它的体力是"+physical);
   }
}

